    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};
export const deleteById = (id:any) => {
    return service({
        url: '/order/index/deleteById/' + id,
        method: 'post'
    })
};
export const getShopType = (typeId:any) => {
    return service({
        url: '/shop/index/getShopType/' + typeId,
        method: 'post'
    })
};



// demo接口2
export const demo2 = (data:any) => {
    return service({
        url: '/user/user/demo2',
        method: 'post',
        data
    })
};
// 用户登录
export const login = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};

export const getOrderList = (data:any) => {
    return service({
        url: '/order/index/getOrderList',
        method: 'post',
        data
    })
};

export const UserReg = (data: any) => {
  return service({
    url: "/user/index/UserReg",
    method: "post",
    data,
  });
};

// 订单状态修改
export const updateOrder = (data: any) => {
  return service({
    url: "/order/index/updateOrder",
    method: "post",
    data,
  });
};
export const deleteAll = (data: any) => {
  return service({
    url: "/order/index/deleteAll",
    method: "post",
    data,
  });
};

// 订单状态修改
export const getUser = () => {
  return service({
    url: "/user/index/getUser",
    method: "post",
  });
};

export const getShop = (data:any) => {
    return service({
        url: '/shop/index/getShopList',
        method: 'post',
        data
    })
};
export const addShop = (data:any) => {
    return service({
        url: '/shop/index/addShop',
        method: 'post',
        data
    })
};
export const getTreeList = () => {
    return service({
        url: '/user/index/getTreeList',
        method: 'post',
        
    })
};
export const registerService = (data:any) => {
    return service({
        url: '/user/register',
        method: 'post',
        data
    })
};

export const updateShopStatus = (data:any) => {
    return service({
        url: '/shop/index/updateShopStatus',
        method: 'post',
        data
    })
};

export const getShopData = () => {
    return service({
        url: '/shop/index/getShopData',
        method: 'post'
    })
};
export const getShopDayData = () => {
    return service({
        url: '/shop/index/getShopDayData',
        method: 'post'
    })
};

